@import '../../assets/styles/common/config.scss';
@import '../../assets/styles/common/variables.scss';

.aui-btn{
	position: relative;
	display: block;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: 0.28rem;
	padding-right: 0.28rem;
	font-size: 0.32rem;
	@include flex;
	@include flexCenterHori;
	@include flexCenterVeri;
	text-decoration: none;
	color: #fff;
	height: 0.88rem;
	border-radius: 4px;
	overflow: hidden;
	background-color: $default;
	white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    border-width: 0;
    appearance: none;
    outline: 0;
	&:focus {
        outline: 0;
    }
	&:active{
		background-color: $default - 30;
	}

	&.aui-btn--inline, &.aui-btn--mini {
        width: auto;
    }
    
    &.aui-btn--inline {
        display: inline-block;
    }
	
	@each $type, $value in (default: $default, primary: $primary, success: $success, warn: $warn){
		&--#{$type}{
			background-color: $value;
			@if $type == 'default' {
				color: #999;
			}
			&:active{
				background-color: $value - 30;
			}

			&--plain{
				color: $value;
			    border: 1px solid $value;
		        background-color: transparent;
		        &:active{
					color: #fff;
					@if $type == 'default' {
						color: #999;
					}
				}
			}
		}
	}
	
	&--disabled{
		pointer-events: none;
		opacity: 0.75;
	}
	

	&--mini {
        height: 0.64rem;
        font-size: 0.28rem;
        padding: 0 .75em;
        display: inline-block;
    }

}